package org.s3.project.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.s3.project.entity.Orders;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author cfx
 * @version 1.0
 * @Description
 * @date 2025/2/9 10:00
 */
@Service
public interface OrdersService extends IService<Orders> {
    Boolean updState(String outTradeNo);

    Orders getByOrdersNumber(String ordersNumber);

    //根据商家id查询订单
    List<Orders> getOrdersByUserId(int merchant_id);
    //修改状态
    int updateStatus(int status,int merchant_id);
    //查询商家当日订单
    List<Orders> getTodayOrders(int merchant_id);

//    //根据用户姓名查询订单
//    public List<Map<String, Object>> selectOrders(int id);
    //根据用户姓名查询订单
    public List<Orders> selectOrders(int id);
    //查询待评价的订单
    List<Orders> ShowEvaluate(@Param("id")int id);
    //修改评论 1已经评价
    Boolean updatepinglun(@Param("od") String od);
    //退款
    public Boolean refundOrder(List<Orders> orders);

    //新增退款条件
    Boolean addOrders();
//新增订单
    Boolean insertOrdersBy(Orders orders);
//退款
    Boolean Tuikuan(String oid,String refund_reason);

    //查看退款订单
    List<Orders> ShowTuiKuan(@Param("id")int id);

  //查看进行中订单
    List<Orders> ShowProgress(@Param("id") int id);
//客户取消订单
    Boolean cancelOrder(@Param("cancel_reason") String cancel_reason ,@Param("id") int id);
    List<Orders> selectMerchantMonthSalesDetail(int merchant_id);
}
